Skip to content

chore: bump Go 1.15→1.25, upgrade deps, modernize interface{} to any#7

Closed
ankurs wants to merge 3 commits intomainfrom
feat/dep-cleanup-go125
Closed

chore: bump Go 1.15→1.25, upgrade deps, modernize interface{} to any#7
ankurs wants to merge 3 commits intomainfrom
feat/dep-cleanup-go125

Conversation

@ankurs
Copy link
Member

@ankurs ankurs commented Mar 20, 2026

  • Bump go directive to 1.25
  • Bump grpc v1.56.3 → v1.79.3, options → v0.2.3, log → v0.2.4, uuid → v1.6.0
  • Replace 12 interface{} → any in notifier/notifier.go
  • Fix non-constant fmt.Errorf format strings (Go 1.25 vet)

Summary by CodeRabbit

  • Bug Fixes

    • Improved error message handling to ensure proper formatting and prevent unintended interpretation
  • Chores

    • Upgraded Go toolchain to version 1.25.0 for enhanced performance, security, and long-term compatibility
    • Updated core dependencies to their latest stable versions for improved reliability

- Bump go directive to 1.25
- Bump grpc v1.56.3 → v1.75.0, options → v0.2.3, log → v0.2.4, uuid → v1.6.0
- Replace 12 interface{} → any in notifier/notifier.go
- Fix non-constant fmt.Errorf format strings (Go 1.25 vet)
@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

Warning

Rate limit exceeded

@ankurs has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 48 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4bf56850-8a1e-4ec0-a7d4-9d4f5a2aca4b

📥 Commits

Reviewing files that changed from the base of the PR and between 58076ad and 91dcd51.

📒 Files selected for processing (1)
  • .github/workflows/go.yml
📝 Walkthrough

Walkthrough

The pull request updates the project to Go 1.25.0, modernizes the codebase by replacing interface{} with the any type alias across notifier functions, bumps multiple dependency versions, and modifies error message formatting in the errors package to prevent unintended format string interpretation.

Changes

Cohort / File(s) Summary
Error Formatting
errors.go
Modified NewWithSkip and NewWithSkipAndStatus to wrap messages using fmt.Errorf("%s", msg) instead of fmt.Errorf(msg), preventing msg from being interpreted as a format pattern.
Type Modernization
notifier/notifier.go
Updated public API and internal types to use any instead of interface{} across variadic parameters (Notify, NotifyWithLevel, NotifyWithLevelAndSkip, NotifyWithExclude, NotifyOnPanic), maps, and callback signatures.
Dependency Management
go.mod
Bumped Go toolchain from 1.15 to 1.25.0; updated versions for go-coldbrew/log, go-coldbrew/options, google/uuid, and google.golang.org/grpc; reorganized indirect dependencies into a separate require block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 From interface{} to any we hop,
Format strings now secure, no surprises to stop,
Dependencies bumped to the latest and great,
Go 1.25 makes our code feel first-rate! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the three main changes: Go version bump (1.15→1.25), dependency upgrades, and interface{} to any modernization.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/dep-cleanup-go125
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

ankurs added 2 commits March 20, 2026 09:44
Go 1.26 toolchain normalizes go directive to 1.25.0; upgrade
actions/checkout to v4 and actions/setup-go to v5 so CI
installs a Go version that understands this format.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project to a newer Go toolchain version, upgrades key dependencies, and performs small modernization/compatibility fixes (e.g., any and go vet format-string compliance) across the library.

Changes:

  • Bumped Go version (module + CI) and upgraded core deps including grpc, uuid, log, and options.
  • Modernized notifier APIs/locals from interface{} to any.
  • Adjusted fmt.Errorf usage to avoid non-constant format-string vet failures under newer Go versions.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

File Description
notifier/notifier.go Updates variadic APIs and maps/slices from interface{} to any.
go.mod Bumps Go version directive and updates required dependencies/indirect requirements.
errors.go Fixes fmt.Errorf calls to use a constant format string for go vet compatibility.
.github/workflows/go.yml Updates GitHub Actions to newer checkout/setup-go and targets Go 1.25.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 145 to 149
if tags, ok := data.(isTags); ok {
tagData = append(tagData, tags.value())
} else {
extraData[reflect.TypeOf(data).String()+strconv.Itoa(pos)] = data
}
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseRawData can panic when rawData contains a nil value: reflect.TypeOf(data) returns nil, so calling .String() will panic. Since this code runs in the error-notification path, it would be safer to guard data == nil (e.g., skip it or store it under a stable key like "nil"+pos).

Copilot uses AI. Check for mistakes.
Comment on lines 156 to 164
// NewWithSkip creates a new error skipping the number of function on the stack
func NewWithSkip(msg string, skip int) ErrorExt {
return WrapWithSkip(fmt.Errorf(msg), "", skip+1)
return WrapWithSkip(fmt.Errorf("%s", msg), "", skip+1)
}

// NewWithSkipAndStatus creates a new error skipping the number of function on the stack and GRPC status
func NewWithSkipAndStatus(msg string, skip int, status *grpcstatus.Status) ErrorExt {
return WrapWithSkipAndStatus(fmt.Errorf(msg), "", skip+1, status)
return WrapWithSkipAndStatus(fmt.Errorf("%s", msg), "", skip+1, status)
}
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fmt.Errorf("%s", msg) is equivalent to errors.New(msg) here, but incurs formatting overhead and makes intent less direct. Consider using errors.New(msg) (from the stdlib) for a simple string error while still satisfying go vet’s constant-format requirement.

Copilot uses AI. Check for mistakes.
@ankurs
Copy link
Member Author

ankurs commented Mar 21, 2026

creating a new pr

@ankurs ankurs closed this Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants